from xmlrpc_interface import xmlrpc_server

if __name__ == "__main__":
    from twisted.python import log
    from twisted.internet import reactor
    import sys
    
    log.startLogging(sys.stdout)
    
    server = xmlrpc_server.XMLRPC_Server( standalone = True ) 
    reactor.run()
else:
    from twisted.application import service

    application = service.Application('DEM XMLRPC Interface')
    server = xmlrpc_server.XMLRPC_Server()
    server.http_listener.setServiceParent( application )